Skip to content

Thrift connection pool does not clean up stale connections #565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

danp60
Copy link

@danp60 danp60 commented Apr 6, 2014

Hi,

I ran into this issue after doing a rolling restart. Basically what happens is that when a connection gets disconnected, the corresponding Rest.Client gets added back into the connection pool without the underlying connection being cleaned up.

My fix simply closes the underlying connection. The next time the Rest.Client is used, a new connection will be opened automatically.

@Mpdreamz
Copy link
Member

Mpdreamz commented Apr 6, 2014

Hey this looks great @danp60

Can you sign the elasticsearch CLA:

http://www.elasticsearch.org/contributor-agreement/

So I can pull the bits in, thanks!

@danp60
Copy link
Author

danp60 commented Apr 6, 2014

I've signed it. @Mpdreamz

Mpdreamz added a commit that referenced this pull request Apr 7, 2014
Thrift connection pool does not clean up stale connections
@Mpdreamz Mpdreamz merged commit d5a743d into elastic:master Apr 7, 2014
@danp60 danp60 deleted the bugfix/close_bad_thrift_connections branch April 24, 2014 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants